import request from '../utils/request';


/**获取报表头 */
export function GetReportColumns({ reportName }) {
    return request(`/api/restricted/report/info/${reportName}`, {
        method: 'POST'
    });
}
/**获取报表数据 */
export function GetReportDataLists({ repReq }) {
    let data = JSON.stringify(repReq)
    return request(`/api/restricted/report/listData`, {
        method: 'POST',
        body: data,
    });
}

/**导出报表数据 */
export function ExportReportDatas({ repReq }) {
    let data = JSON.stringify(repReq)
    return request(`/api/restricted/report/export`, {
        method: 'POST',
        body: data,
    }, "blob");
}

/**获取报表账户余额数据 */
export function GetReportACBL({ reportName, sdate, edate, acid }) {
    var data = new FormData()
    data.append('reportName', reportName)
    data.append('sdate', sdate)
    data.append('edate', edate)
    data.append('acid', acid)
    return request(`/api/restricted/report/acbl`, {
        method: 'POST',
        body: data,
    });
}

/**获取报表账户利率数据 */
export function GetReportINRT({ reportName, sdate, edate, acid }) {
    var data = new FormData()
    data.append('reportName', reportName)
    data.append('sdate', sdate)
    data.append('edate', edate)
    data.append('acid', acid)
    return request(`/api/restricted/report/inrt`, {
        method: 'POST',
        body: data,
    });
}

/**获取报表账户账户认定关系 */
export function GetReportDIVI({ reportName, acid }) {
    var data = new FormData()
    data.append('reportName', reportName)
    data.append('acid', acid)
    return request(`/api/restricted/report/divi`, {
        method: 'POST',
        body: data,
    });
}

export function GetPermissionName({ permID }) {
    var data = new FormData()
    data.append('permID',permID)
    return request(`/api/restricted/GetPermissionName`, {
        method: 'POST',
        body: data,
    });
}
